package com.fivebrms.model 
{
	import org.osflash.thunderbolt.Logger;
	
	import com.adobe.cairngorm.model.ModelLocator;

	import com.fivebrms.vo.W9FormVO;
	import com.fivebrms.vo.LoginFormVO;
	import com.fivebrms.vo.ConfidentialityVO;
	import com.fivebrms.vo.IndependentVO;
	
	import com.fivebrms.view.independent.About;
	import com.fivebrms.view.independent.FormFields;
	
	import com.fivebrms.view.main.Main;
	
	public class MainModelLocator implements ModelLocator
	{

		private static var modelLocator : MainModelLocator;
		
		public var w9FormVo : W9FormVO;
		public var confidentialityVO : ConfidentialityVO;
		public var independentVO : IndependentVO;
		public var loginFormVO : LoginFormVO;
		
		public var main : Main;
		//
		// a container mx element which is to be made into a pdf 
		//
		public var aboutIndependent : About;
		public var formIndependent : FormFields;
		
		public static function getInstance() : MainModelLocator 
		{
			if ( MainModelLocator.modelLocator == null )
			{
				MainModelLocator.modelLocator = new MainModelLocator();
			}

			return MainModelLocator.modelLocator;
		}
		
		public function MainModelLocator()
		{
			if ( MainModelLocator.modelLocator != null )
			{
				throw new Error( "Only one UploadModelLocator instance should be instantiated" );
			}
			else
			{
				Logger.info("singletons instantiated..");
				
				w9FormVo = new W9FormVO();
				loginFormVO = new LoginFormVO();
				confidentialityVO = new ConfidentialityVO();
				independentVO = new IndependentVO();
			}
		}
		
	}
}